# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=libcroco

pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.6.8
pkgrel=2
pkgdesc="A CSS parsing library (mingw-w64)"
arch=('any')
url="http://www.gnome.org"
license=("LGPL")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config")
depends=("${MINGW_PACKAGE_PREFIX}-glib2" "${MINGW_PACKAGE_PREFIX}-libxml2")
options=('staticlibs' 'strip')
source=("http://ftp.gnome.org/pub/gnome/sources/libcroco/${pkgver%.*}/${_realname}-$pkgver.tar.xz")
sha256sums=('ea6e1b858c55219cefd7109756bff5bc1a774ba7a55f7d3ccd734d6b871b8570')

build() {
    mkdir -p "${srcdir}/build-${MINGW_CHOST}"
    cd "${srcdir}/build-${MINGW_CHOST}"
    "${srcdir}"/${_realname}-$pkgver/configure \
      --prefix=${MINGW_PREFIX} \
      --build=${MINGW_CHOST} \
      --host=${MINGW_CHOST}
    make
}

package() {
    mkdir -p "${pkgdir}${MINGW_PREFIX}/bin"
    cd "${srcdir}/build-${MINGW_CHOST}"
    make DESTDIR="$pkgdir" install
}
